<?php
require_once 'DBConnecter.inc';
class Payslip extends DBConnecter {
	public $mem_id = ""; // 사원번호
	public $mem_nm = ""; // 성명
	public $cusm_cd = ""; // 거래처
	public $c_brno = ""; // 근무점포
	public $car_id = ""; // 차량번호
	public $bank_nm = ""; // 지급은행
	public $act_nm = ""; // 예금주명
	public $actno = ""; // 계좌번호
	public $sply_amt = ""; // 지급액
	public $fare_amt = ""; // 기본 운송료
	public $comm_exp = ""; // 통신비
	public $car_wash_exp = ""; // 세차비
	public $attend_exp = ""; // 만근지원비
	public $incen_pay = ""; // 운행장려금
	public $dil_van_exp = ""; // 용차비
	public $apd_dil_exp = ""; // 운송료추가
	public $dil_etc_exp = ""; // 기타
	public $receipt_exp = ""; // 기타2
	public $tot_dil_amt = ""; // 운송료 합계
	public $mngt_exp = ""; // 관리비
	public $surtax = ""; // 부가세
	public $insu_fee = ""; // 보험료
	public $insu_deg = ""; // 회차
	public $commit_fee = ""; // 환경개선비/협회비
	public $car_tax = ""; // 자동차세
	public $gps_fee = ""; // GPS
	public $fine_fee = ""; // 과태료
	public $acct_fee = ""; // 사고접보비
	public $mileage_fee = ""; // 유류연비차액
	public $commute_oil_fee = ""; // 퇴근유류비
	public $instl_fee = ""; // 차량할부
	public $instl_deg = ""; // 할부회차
	public $deposit = ""; // 예치금
	public $ada_pay = ""; // 선지급
	public $account_fee = ""; // 기장료
	public $trans_fee = ""; // 이체수수료
	public $paint_exp = ""; // 도색비
	public $charoff_etc_fee = ""; // 기타
	public $incm_tax = ""; // 사업소득세
	public $tot_dedt_amt = ""; // 공제 합계
	public $notice = ""; // 공제 합계
	
	function __construct() {
		$this->connectDB ();
	}
	public function search4Detail($value) {
		$sql = "CALL ".self::CONST_DB.".search('4','1','" . $value . "', '', '');select @out_err_cd, @out_err_msg;";
		// echo $sql;
		$retval = array ();
		
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->mem_id = $row ['0'];
					$this->mem_nm = $row ['1'];
					$this->cusm_cd = $row ['2'];
					$this->c_brno = $row ['3'];
					$this->car_id = $row ['4'];
					$this->bank_nm = $row ['5'];
					$this->act_nm = $row ['6'];
					$this->actno = $row ['7'];
					$this->sply_amt = $row ['8'];
					$this->fare_amt = $row ['9'];
					$this->comm_exp = $row ['10'];
					$this->car_wash_exp = $row ['11'];
					$this->attend_exp = $row ['12'];
					$this->incen_pay = $row ['13'];
					$this->dil_van_exp = $row ['14'];
					$this->apd_dil_exp = $row ['15'];
					$this->dil_etc_exp = $row ['16'];
					$this->receipt_exp = $row ['17'];
					$this->tot_dil_amt = $row ['18'];
					$this->mngt_exp = $row ['19'];
					$this->surtax = $row ['20'];
					$this->insu_fee = $row ['21'];
					$this->insu_deg = $row ['22'];
					$this->commit_fee = $row ['23'];
					$this->car_tax = $row ['24'];
					$this->gps_fee = $row ['25'];
					$this->fine_fee = $row ['26'];
					$this->acct_fee = $row ['27'];
					$this->mileage_fee = $row ['28'];
					$this->commute_oil_fee = $row ['29'];
					$this->instl_fee = $row ['30'];
					$this->instl_deg = $row ['31'];
					$this->deposit = $row ['32'];
					$this->ada_pay = $row ['33'];
					$this->account_fee = $row ['34'];
					$this->trans_fee = $row ['35'];
					$this->paint_exp = $row ['36'];
					$this->charoff_etc_fee = $row ['37'];
					$this->incm_tax = $row ['38'];
					$this->tot_dedt_amt = $row ['39'];
					$this->notice = $row ['40'];
				}
				$rs->free ();
			}
		}
	}
}